//
//  LZ_API.h
//  ShellWallert
//
//  Created by lvzhao on 2019/5/13.
//  Copyright © 2019 吕VV. All rights reserved.
//

#ifndef LZ_API_h
#define LZ_API_h

#ifdef DEBUG



#define kWebSocketUrl @"wss://api.tritonlab.net/webSocket"
#define kBaseHttpRequestUrl @"https://api.tritonlab.net"
//
//#define kWebSocketUrl @"wss://api.tritonlab.net/webSocket"
//#define kBaseHttpRequestUrl @"http://ttt.tritonlab.net"

#else

#define kWebSocketUrl @"wss://api.tritonlab.net/webSocket"
#define kBaseHttpRequestUrl @"https://api.tritonlab.net"
//#define kWebSocketUrl @"wss://api.tritonlab.net/webSocket"
//#define kBaseHttpRequestUrl @"http://ttt.tritonlab.net"

#endif


#define LZString(...) [NSString stringWithFormat:__VA_ARGS__]
#define kCode     @"999999"
#define kResultStatus @"resultCode"
#define kResultMessage @"resultDesc"
#define kResultData @"resultData"



#define kPageSize @"15"

#define kResultRecords @"records"
#define kPrecision 2

#define k_IsNoNetwork [error.localizedDescription containsString:@"似乎已断开与互联网的连接"] ||[error.localizedDescription containsString:@"The request timed out"] || [error.localizedDescription containsString:@"请求超时"]||[error.localizedDescription containsString:@"The Internet connection appears to be offline"]


//基础URL
#define kBaseRequestApi(des)                                      LZString(@"%@%@",kBaseHttpRequestUrl,des)//

//项目API
///!!!: 用户相关
#define kSendRegisterEmail                                  kBaseRequestApi(@"/sendRegisterEmail")                                  //发送验证码
#define kSendResetPasswordEmail                             kBaseRequestApi(@"/sendResetPasswordEmail")                             //忘记密码 发送验证码
#define ksendResetPayPasswordEmail                          kBaseRequestApi(@"/user/sendResetPayPasswordEmail")                     //修改交易密码 发送邮件


#define kRegister                                           kBaseRequestApi(@"/register")                                           //注册
#define kLogin                                              kBaseRequestApi(@"/login")                                              //登录
#define kAppUpdates                                         kBaseRequestApi(@"/checkUpdates")                                       //检测新版本
#define kResetPasswordForget                                kBaseRequestApi(@"/resetPasswordForget")                                //忘记密码





///!!!: 我的
#define kUserInfo                                            kBaseRequestApi(@"/user/readInfo")                                     //个人信息
#define kUnReadeMsg                                          kBaseRequestApi(@"/message/getUnReadeMsgCount")                        //未读消息数量
#define kInviteInfo                                          kBaseRequestApi(@"/user/getMyInviteInfo")                              //我的邀请信息
#define kMyFriends                                           kBaseRequestApi(@"/user/queryMyFriends")                               //我的好友
#define kUploadImg                                           kBaseRequestApi(@"/components/file/uploadImg")                         //上传图片
#define kUploadPortrait                                      kBaseRequestApi(@"/user/updatePortrait")                               //修改头像
#define kUserResetPassword                                   kBaseRequestApi(@"/resetPassword")                                     //修改登录密码
#define kUserResetPayPassword                                kBaseRequestApi(@"/user/resetPayPassword")                             //修改交易密码
#define kMessageQueryMsgList                                 kBaseRequestApi(@"/message/queryMsgList")                              //消息列表
#define kReadMsg                                             kBaseRequestApi(@"/message/readMsg")                                   //标记已读
#define kLastestVersion                                      kBaseRequestApi(@"/exchangeRate/getLastestVersion")                    //全球汇率
#define kSaveName                                            kBaseRequestApi(@"/user/saveName")                                     //保存姓名
#define kLevelInfo                                           kBaseRequestApi(@"/user/readUserLevelInfo")                            //等级信息



///!!!: 订单
#define kGetSettlData                                       kBaseRequestApi(@"/order/getSettlData")                                 //获取全网数据
#define kGetStatus                                          kBaseRequestApi(@"/order/getStatus")                                    //获取用户状态
#define kUpdateStatus                                       kBaseRequestApi(@"/order/updateStatus")                                 //更新用户状态
#define kQueryOrderList                                     kBaseRequestApi(@"/order/queryOrderList")                               //订单列表
#define kReadOrderInfo                                      kBaseRequestApi(@"/order/readOrderInfo")                                 //订单详情
#define kReadScramble                                       kBaseRequestApi(@"/order/scramble")                                      //抢单订单
#define kUserStatusTextDesc                                 kBaseRequestApi(@"/order/getUserStatusTextDesc")                         //开始接单的文案
#define kProcess                                            kBaseRequestApi(@"/order/process")                                       //处理订单
#define kCrowdList                                          kBaseRequestApi(@"/crowd/queryCrowdList")                                //众筹币
#define kCrowdInfo                                          kBaseRequestApi(@"/crowd/readCrowdInfo")                                //众筹币详情
#define kCrowdBuy                                           kBaseRequestApi(@"/crowd/buy")                                          //众筹币购买
#define kPledgeDetail                                       kBaseRequestApi(@"/account/queryPledgeDetailList")                     //清算列表


///!!!: 钱包
#define kReadWalletInfo                                      kBaseRequestApi(@"/wallet/readWalletInfo")                              //获取用户usdt钱包数据
#define kQueryWalletDetail                                   kBaseRequestApi(@"/wallet/queryWalletDetail")                           //获取用户usdt钱包记录
#define kGetWalletAddress                                    kBaseRequestApi(@"/wallet/getWalletAddress")                            //获取用户钱包地址
#define kPledgePreInfo                                       kBaseRequestApi(@"/wallet/getPledgePreInfo")                            //质押详情
#define kPledge                                              kBaseRequestApi(@"/wallet/pledge")                                      //开始质押
#define kWithdraw                                            kBaseRequestApi(@"/wallet/withdraw")                                    //提币
#define kProfitInfo                                          kBaseRequestApi(@"/wallet/getPledgeProfitInfo")                         //收益说明
#define kClearTextDesc                                       kBaseRequestApi(@"/wallet/getClearTextDescMap")                        //清算的文案
#define kClear                                               kBaseRequestApi(@"/account/clear")                                       //确认清算
#define kUserProfit                                          kBaseRequestApi(@"/wallet/queryUserProfit")                             //查询收益
#define kTodayProfit                                         kBaseRequestApi(@"/wallet/getTodayProfit")                              //今日收益
#define kWithdrawLimit                                       kBaseRequestApi(@"/wallet/getWithdrawLimit")                            //提币限额
#define kExchangeRate                                        kBaseRequestApi(@"/wallet/getExchangeRate")                             //闪兑汇率
#define kExchange                                            kBaseRequestApi(@"/wallet/exchange")                                    //闪兑



///!!!: 矿池
#define kGetStaticInfo                                       kBaseRequestApi(@"/getStaticInfo")                                     //首页静态数据
#define kReadAccount                                         kBaseRequestApi(@"/account/readAccount")                               //获取用户账户
#define kNetworkHashRate                                     kBaseRequestApi(@"/hashRate/queryNetworkHashRateList")                 //获取全网算力
#define kHashAwardList                                       kBaseRequestApi(@"/account/queryHashAwardList")                        //获取矿池奖励











#endif /* LZ_API_h */
